<template>
  <div class="wrapper">
    <div class="title">{{ title }}</div>
    <ul>
      <li v-for="menu in $store.getters.tree" :key="menu.id">
        <span>{{ menu.name }}</span>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "Header",

  data() {
    return {
      title: process.env.VUE_APP_TITLE,
    };
  },

  mounted() {},

  methods: {},
};
</script>

<style lang="scss" scoped>
.wrapper {
  height: 60px;
  background-color: #545d64;
  color: white;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  .title {
    font-size: 20px;
    font-weight: 500;
  }

  ul {
    list-style: none;
    overflow: hidden;

    li {
      float: left;
      padding: 0 20px;
      cursor: pointer;
      height: 60px;
      line-height: 60px;
      transition: 0.3s;
      &:hover {
        background-color: #434a50;
      }

      &.active {
        color: #fecf4c;

        border-bottom: 1px solid currentColor;
      }
    }
  }
}
</style>